package edu.iscas.xcheck.analysis.model;

public class AnalysisInfo {
	private String testCaseId;
	private String status;
	public static enum AnalysisStatus {
		CREATED, FAILED, FINISHED
	}
	public String getTestCaseId() {
		return testCaseId;
	}
	public void setTestCaseId(String testCaseId) {
		this.testCaseId = testCaseId;
	}
	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	public void setCreated(){
		this.status = "Created";
	}
	public void setFinished(){
		this.status = "Finish";
	}
	public void setFailed(){
		this.status = "Failed";
	}
	public AnalysisInfo() {
	}
	public AnalysisInfo(String testCaseId, AnalysisStatus status) {
		super();
		this.testCaseId = testCaseId;
		switch(status){
		case CREATED:
			this.setCreated();
			break;
		case FAILED:
			this.setFailed();
		case FINISHED:
			this.setFinished();
		}
			
	}
	public AnalysisInfo(String testCaseId, String status) {
		super();
		this.testCaseId = testCaseId;
		this.status = status;
	}
	@Override
	public String toString() {
		return "AnalysisInfo [testCaseId=" + testCaseId + ", status=" + status + "]";
	}
	
}
